Repository navigation
fix(studio): Studio's own text reads without em or en dashes - #5414
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Edit accuracy: accurate 2061 (base branch 2061), smooth 1609 of thoseThe gate passes. Quarantined, measured but not gated (0) |
somanshreddy
left a comment
There was a problem hiding this comment.
Approving at 84453ca8.
The check
check-studio-copy-dashes.mjsreports 304 hits on the merge base6f3f86a9(run with the head's checker) and 0 at head. Its test passes 5/5.- All 7 mutants of the checker are killed:
- dropping
JsxText,TemplateHeadorTemplateTail - dropping the
—/numeric-entity alternatives - em-dash only (no en dash)
- scanning test files
- widening the
equalsexemption
- dropping
- No
.js/.mjs/.jsx/.css/.html/.jsonfiles under the 10 scannedsrcdirs carry a dash, so restricting the scan to.ts/.tsxleaves no gap today. - It is wired into the root
lintscript, and its test is intest:scripts.
Output contracts (the rewording is where this could break something)
- In-repo matchers still match.
renderChunk.ts:286andcaptureCost.ts:510match/Frame still pending/, and the newscreenshotService.ts:134text still contains it.de-gatecheck.shwas updated for thefalling back to … captureline. - I found no other consumers. I grepped the rest of the tree (scripts, skills, cli, docs) for the reworded log and error prefixes:
HDR auto-promotion,No HDR sources detected,falling back to SDR,Continuing render,pinning to 1,__player was never set,outputResolution is not supported,Failed to download CDN script. The only hits are the changed sources and their updated tests. The cli'sContinuing render despite lint …is its own string. - No EF caller depends on the old wording. The experiment-framework hyperframes render activities and MCP tools don't string-match any of these messages.
- The shipped-as-string code edits are comment- or message-only. That covers the worklet source, the GLSL frag comments, the player CSS comment, injected runtime
console.warns and the HyperShader warnings. GLSL//comments are unaffected by the colon and parenthesis rewording.
CI: all required checks are green, the edit accuracy gate included. No reviews or CRs yet.
Nit (not verified): some reworded engine/producer log lines are operational, e.g. [engine] fast capture: falling back to … and [BeginFrame] Frame still pending …. If a Datadog log monitor or saved search keys on the old — text, it will stop matching. Nothing in either repo does, but I didn't audit Datadog.
Review by Somu
What
Text a person reads in Studio no longer uses em dashes (—) or en dashes (–). That covers Studio's own tooltips, toasts, empty states, errors and labels, and the messages it shows from other packages: lint findings, SDK save refusals, studio-server errors, audio FX and preset copy from core, and render errors from the producer and engine. They now use a colon, a comma, a period, parentheses, or "to" for a range. A new lint check keeps it that way.
Why
Studio's text should use plain punctuation, and the dashes were used inconsistently across it. A lint check is the root fix: without it, new text brings them back.
Related work
None.
How
scripts/check-studio-copy-dashes.mjsparses every non-test.ts/.tsxfile undersrcinstudio,core,engine,lint,parsers,player,producer,sdk,shader-transitionsandstudio-serverwith the TypeScript compiler. It fails on U+2013 or U+2014 inside string literals, template literal parts and JSX text. It reads the parsed value, so an escaped—counts too, and it also catches—,–and their numeric forms, which JSX keeps raw and React renders as dashes. Comments, regex literals and test files are not checked. It runs in the rootlintscript ascheck:studio-copy-dashes; its test is intest:scripts.Copy failed — check permissions→Copy failed. Check permissions,Linked audio would start after the new end — unlink or trim→... after the new end. Unlink or trim);0.0s – 10.0s→0.0s to 10.0s,try 600–1000→try 600 to 1000);Unavailable(no measurable peak), an unset in/out point in the shortcuts panel showsNot set, the text-case "none" button showsNone, and the select placeholder— select branch —becameSelect branch.core/src/compiler/compositionScoping.ts: a comment inside injected runtime JS ("Swallow — the scoped root ..."). It is copied byte for byte into the producer's regression goldens and the docs catalog payloads, and no person reads it.core/src/figma/mediaIndex.ts: the"—"empty cell of.media/index.md, a file written for agents. It must stay identical to the two media-use copies of the same generator, which a parity test enforces.cli(terminal output),aws-lambda,gcp-cloud-run,sdk-playground, and Studio's dev-onlyvite.config.ts.hdr, producerhdrMode, clicheckBrowser, studiosdkCutover.linkedTiming).packages/producer/de-gatecheck.shgreps one engine log line and now matches the new wording.docs/studio/animation.mdxquotes the new "Computed value" notice.Review
Independent adversarial review of the Studio-only commits: no blocking findings. Should-fix items were addressed: the docs line, HTML entities in the check, test coverage for every node kind and the file filter, and the empty peak value wording.
Test plan
Check on main (bb9e507): exit 1, 304 hits (per package above). On this branch: passes.
Gate test: 5/5 pass, 3 runs in a row. Each mutation fails it: removing any checked node kind, narrowing the file filter to
.ts, dropping or narrowing any entity form, dropping the case-insensitive flag, dropping a package from the scan, or widening an exemption.bun run lintandbun run format:check: green.Typecheck green for core, engine, producer, lint, sdk, parsers, player, shader-transitions, studio-server, cli and studio.
Test suites (Linux): core 198 files, engine 91, producer 54, lint 20, sdk 23, parsers 45, player 17, shader-transitions 6, studio-server 69, studio 694, all passing. cli: 306 files pass. 2 files (
browser/launch.process,motion-signature.browser.chromium) fail the same way with and without this change, from timeouts launching the browser on that machine.Changed test files pass 3 runs in a row.
Before/After captures of the Linked Selection tooltip from the Studio dev server on the
product-promoregistry example.Unit tests added/updated
Manual testing performed
Documentation updated (if applicable)
Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug
Before
After